/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.dqsy.dqsyquiry.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.service.TreeService;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.dqsy.dqsyquiry.entity.YyLeftTrees;
import com.jeeplus.modules.dqsy.dqsyquiry.mapper.YyLeftTreesMapper;

/**
 * 目录结构Service
 * @author 于金洋
 * @version 2020-09-12
 */
@Service
@Transactional(readOnly = true)
public class YyLeftTreesService extends TreeService<YyLeftTreesMapper, YyLeftTrees> {

	public YyLeftTrees get(String id) {
		return super.get(id);
	}
	
	public List<YyLeftTrees> findList(YyLeftTrees yyLeftTrees) {
		if (StringUtils.isNotBlank(yyLeftTrees.getParentIds())){
			yyLeftTrees.setParentIds(","+yyLeftTrees.getParentIds()+",");
		}
		return super.findList(yyLeftTrees);
	}
	
	@Transactional(readOnly = false)
	public void save(YyLeftTrees yyLeftTrees) {
		super.save(yyLeftTrees);
	}
	
	@Transactional(readOnly = false)
	public void delete(YyLeftTrees yyLeftTrees) {
		super.delete(yyLeftTrees);
	}
	
}